<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>从GitLab上拉取项目 | Bob周的空间</title><meta name="author" content="周天赐"><meta name="copyright" content="周天赐"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="创建一个问渐渐，放你本地项目。 右键打开git bash here 更换你所使用的用户名和邮箱： git config –global user.name “name” git config –global user.eamil “email”   生成密匙 ssh-keygen -t rsa -C “您的邮箱地址”   将生成的公钥配置到gitlab上 git clone 项目地址url，注意">
<meta property="og:type" content="article">
<meta property="og:title" content="从GitLab上拉取项目">
<meta property="og:url" content="https://github.com/Bob20020619/Bob20020619.github.io/2024/06/16/%E4%BB%8EGitLab%E4%B8%8A%E6%8B%89%E5%8F%96%E9%A1%B9%E7%9B%AE/index.html">
<meta property="og:site_name" content="Bob周的空间">
<meta property="og:description" content="创建一个问渐渐，放你本地项目。 右键打开git bash here 更换你所使用的用户名和邮箱： git config –global user.name “name” git config –global user.eamil “email”   生成密匙 ssh-keygen -t rsa -C “您的邮箱地址”   将生成的公钥配置到gitlab上 git clone 项目地址url，注意">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://github.com/Bob20020619/Bob20020619.github.io/img/avatar.jpg">
<meta property="article:published_time" content="2024-06-16T06:21:13.091Z">
<meta property="article:modified_time" content="2024-06-16T06:29:53.129Z">
<meta property="article:author" content="周天赐">
<meta property="article:tag" content="Markdown">
<meta property="article:tag" content="干货">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://github.com/Bob20020619/Bob20020619.github.io/img/avatar.jpg"><link rel="shortcut icon" href="/Bob20020619/Bob20020619.github.io/img/favicon.png"><link rel="canonical" href="https://github.com/Bob20020619/Bob20020619.github.io/2024/06/16/%E4%BB%8EGitLab%E4%B8%8A%E6%8B%89%E5%8F%96%E9%A1%B9%E7%9B%AE/index.html"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/Bob20020619/Bob20020619.github.io/css/index.css?v=4.13.0"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.1/css/all.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0.33/dist/fancybox/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
  root: '/Bob20020619/Bob20020619.github.io/',
  algolia: undefined,
  localSearch: undefined,
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlight.js","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  dateSuffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  infinitegrid: {
    js: 'https://cdn.jsdelivr.net/npm/@egjs/infinitegrid@4.11.1/dist/infinitegrid.min.js',
    buttonText: '加载更多'
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false,
  percent: {
    toc: true,
    rightside: false,
  },
  autoDarkmode: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: '从GitLab上拉取项目',
  isPost: true,
  isHome: false,
  isHighlightShrink: true,
  isToc: false,
  postUpdate: '2024-06-16 14:29:53'
}</script><script>(win=>{
      win.saveToLocal = {
        set: (key, value, ttl) => {
          if (ttl === 0) return
          const now = Date.now()
          const expiry = now + ttl * 86400000
          const item = {
            value,
            expiry
          }
          localStorage.setItem(key, JSON.stringify(item))
        },
      
        get: key => {
          const itemStr = localStorage.getItem(key)
      
          if (!itemStr) {
            return undefined
          }
          const item = JSON.parse(itemStr)
          const now = Date.now()
      
          if (now > item.expiry) {
            localStorage.removeItem(key)
            return undefined
          }
          return item.value
        }
      }
    
      win.getScript = (url, attr = {}) => new Promise((resolve, reject) => {
        const script = document.createElement('script')
        script.src = url
        script.async = true
        script.onerror = reject
        script.onload = script.onreadystatechange = function() {
          const loadState = this.readyState
          if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
          script.onload = script.onreadystatechange = null
          resolve()
        }

        Object.keys(attr).forEach(key => {
          script.setAttribute(key, attr[key])
        })

        document.head.appendChild(script)
      })
    
      win.getCSS = (url, id = false) => new Promise((resolve, reject) => {
        const link = document.createElement('link')
        link.rel = 'stylesheet'
        link.href = url
        if (id) link.id = id
        link.onerror = reject
        link.onload = link.onreadystatechange = function() {
          const loadState = this.readyState
          if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
          link.onload = link.onreadystatechange = null
          resolve()
        }
        document.head.appendChild(link)
      })
    
      win.activateDarkMode = () => {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = () => {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
        if (t === 'dark') activateDarkMode()
        else if (t === 'light') activateLightMode()
      
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
      const detectApple = () => {
        if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
          document.documentElement.classList.add('apple')
        }
      }
      detectApple()
    })(window)</script><meta name="generator" content="Hexo 7.2.0"></head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="/Bob20020619/Bob20020619.github.io/img/avatar.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/Bob20020619/Bob20020619.github.io/archives/"><div class="headline">文章</div><div class="length-num">8</div></a><a href="/Bob20020619/Bob20020619.github.io/tags/"><div class="headline">标签</div><div class="length-num">3</div></a><a href="/Bob20020619/Bob20020619.github.io/categories/"><div class="headline">分类</div><div class="length-num">4</div></a></div><hr class="custom-hr"/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/Bob20020619/Bob20020619.github.io/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/Bob20020619/Bob20020619.github.io/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/Bob20020619/Bob20020619.github.io/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/Bob20020619/Bob20020619.github.io/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/Bob20020619/Bob20020619.github.io/gallery/"><i class="fa-fw fas fa-images"></i><span> 照片</span></a></div><div class="menus_item"><a class="site-page" href="/Bob20020619/Bob20020619.github.io/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/Bob20020619/Bob20020619.github.io/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg fixed" id="page-header"><nav id="nav"><span id="blog-info"><a href="/Bob20020619/Bob20020619.github.io/" title="Bob周的空间"><img class="site-icon" src="/Bob20020619/Bob20020619.github.io/img/avatar.jpg"/><span class="site-name">Bob周的空间</span></a></span><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page" href="/Bob20020619/Bob20020619.github.io/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/Bob20020619/Bob20020619.github.io/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/Bob20020619/Bob20020619.github.io/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/Bob20020619/Bob20020619.github.io/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/Bob20020619/Bob20020619.github.io/gallery/"><i class="fa-fw fas fa-images"></i><span> 照片</span></a></div><div class="menus_item"><a class="site-page" href="/Bob20020619/Bob20020619.github.io/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/Bob20020619/Bob20020619.github.io/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">从GitLab上拉取项目</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2024-06-16T06:21:13.091Z" title="发表于 2024-06-16 14:21:13">2024-06-16</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2024-06-16T06:29:53.129Z" title="更新于 2024-06-16 14:29:53">2024-06-16</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/Bob20020619/Bob20020619.github.io/categories/%E6%95%99%E8%AE%AD/">教训</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="从GitLab上拉取项目"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"><i class="fa-solid fa-spinner fa-spin"></i></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><ol>
<li>创建一个问渐渐，放你本地项目。</li>
<li>右键打开git bash here</li>
<li>更换你所使用的用户名和邮箱：<ol>
<li>git config –global user.name “name”</li>
<li>git config –global user.eamil “email”</li>
</ol>
</li>
<li>生成密匙<ol>
<li>ssh-keygen -t rsa -C “您的邮箱地址”</li>
</ol>
</li>
<li>将生成的公钥配置到gitlab上</li>
<li>git clone 项目地址url，注意这里不是ssh链接，没有用！！！</li>
</ol>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta"><i class="fas fa-circle-user fa-fw"></i>文章作者: </span><span class="post-copyright-info"><a href="https://github.com/Bob20020619/Bob20020619.github.io">周天赐</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta"><i class="fas fa-square-arrow-up-right fa-fw"></i>文章链接: </span><span class="post-copyright-info"><a href="https://github.com/Bob20020619/Bob20020619.github.io/2024/06/16/%E4%BB%8EGitLab%E4%B8%8A%E6%8B%89%E5%8F%96%E9%A1%B9%E7%9B%AE/">https://github.com/Bob20020619/Bob20020619.github.io/2024/06/16/%E4%BB%8EGitLab%E4%B8%8A%E6%8B%89%E5%8F%96%E9%A1%B9%E7%9B%AE/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta"><i class="fas fa-circle-exclamation fa-fw"></i>版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://github.com/Bob20020619/Bob20020619.github.io" target="_blank">Bob周的空间</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/Bob20020619/Bob20020619.github.io/tags/Markdown/">Markdown</a><a class="post-meta__tags" href="/Bob20020619/Bob20020619.github.io/tags/%E5%B9%B2%E8%B4%A7/">干货</a></div><div class="post_share"><div class="social-share" data-image="/Bob20020619/Bob20020619.github.io/img/avatar.jpg" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1.1.3/sharejs/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1.1.3/sharejs/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/Bob20020619/Bob20020619.github.io/2024/06/16/%E5%A4%A7%E8%AF%9D%E9%9D%A2%E8%AF%95/" title="大话面试"><div class="cover" style="background: var(--default-bg-color)"></div><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">大话面试</div></div></a></div><div class="next-post pull-right"><a href="/Bob20020619/Bob20020619.github.io/2024/06/16/%E4%BB%A3%E7%A0%81%E9%9A%8F%E6%83%B3%E5%BD%95/" title="代码随想录"><div class="cover" style="background: var(--default-bg-color)"></div><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">代码随想录</div></div></a></div></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span>相关推荐</span></div><div class="relatedPosts-list"><div><a href="/Bob20020619/Bob20020619.github.io/2024/06/16/%E5%A4%A7%E8%AF%9D%E9%9D%A2%E8%AF%95/" title="大话面试"><div class="cover" style="background: var(--default-bg-color)"></div><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2024-06-16</div><div class="title">大话面试</div></div></a></div><div><a href="/Bob20020619/Bob20020619.github.io/2024/06/16/%E9%9D%A2%E8%AF%95%E7%BB%8F%E5%8E%86%E8%AE%B0%E5%BD%95/" title="面试经历记录"><div class="cover" style="background: var(--default-bg-color)"></div><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2024-06-16</div><div class="title">面试经历记录</div></div></a></div><div><a href="/Bob20020619/Bob20020619.github.io/2024/06/16/%E9%A1%B9%E7%9B%AE%E6%80%BB%E7%BB%93/" title="项目总结"><div class="cover" style="background: var(--default-bg-color)"></div><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2024-06-16</div><div class="title">项目总结</div></div></a></div><div><a href="/Bob20020619/Bob20020619.github.io/2024/06/16/%E8%B5%B0%E9%A9%AC%E8%A7%82%E8%8A%B1/" title="走马观花"><img class="cover" src="/Bob20020619/Bob20020619.github.io/img/top.JPG" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2024-06-16</div><div class="title">走马观花</div></div></a></div><div><a href="/Bob20020619/Bob20020619.github.io/2024/06/16/%E6%A8%A1%E6%8B%9F%E9%9D%A2%E8%AF%95/" title="模拟面试"><div class="cover" style="background: var(--default-bg-color)"></div><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2024-06-16</div><div class="title">模拟面试</div></div></a></div><div><a href="/Bob20020619/Bob20020619.github.io/2024/06/16/%E4%BB%A3%E7%A0%81%E9%9A%8F%E6%83%B3%E5%BD%95/" title="代码随想录"><div class="cover" style="background: var(--default-bg-color)"></div><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2024-06-16</div><div class="title">代码随想录</div></div></a></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="/Bob20020619/Bob20020619.github.io/img/avatar.jpg" onerror="this.onerror=null;this.src='/Bob20020619/Bob20020619.github.io/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">周天赐</div><div class="author-info__description">糟糕，他好像真的在变强！</div></div><div class="card-info-data site-data is-center"><a href="/Bob20020619/Bob20020619.github.io/archives/"><div class="headline">文章</div><div class="length-num">8</div></a><a href="/Bob20020619/Bob20020619.github.io/tags/"><div class="headline">标签</div><div class="length-num">3</div></a><a href="/Bob20020619/Bob20020619.github.io/categories/"><div class="headline">分类</div><div class="length-num">4</div></a></div><a id="card-info-btn" href="https://github.com/Bob20020619"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/Bob20020619" target="_blank" title="Github"><i class="fab fa-github" style="color: #24292e;"></i></a><a class="social-icon" href="mailto:1294811773@qq.com" target="_blank" title="Email"><i class="fas fa-envelope" style="color: #4a7dbe;"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">糟糕，他好像真的在变强！</div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/Bob20020619/Bob20020619.github.io/2024/06/16/%E8%B5%B0%E9%A9%AC%E8%A7%82%E8%8A%B1/" title="走马观花">走马观花</a><time datetime="2024-06-16T06:23:46.853Z" title="发表于 2024-06-16 14:23:46">2024-06-16</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/Bob20020619/Bob20020619.github.io/2024/06/16/%E9%A1%B9%E7%9B%AE%E6%80%BB%E7%BB%93/" title="项目总结">项目总结</a><time datetime="2024-06-16T06:23:46.852Z" title="发表于 2024-06-16 14:23:46">2024-06-16</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/Bob20020619/Bob20020619.github.io/2024/06/16/%E6%A8%A1%E6%8B%9F%E9%9D%A2%E8%AF%95/" title="模拟面试">模拟面试</a><time datetime="2024-06-16T06:23:46.851Z" title="发表于 2024-06-16 14:23:46">2024-06-16</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/Bob20020619/Bob20020619.github.io/2024/06/16/%E9%9D%A2%E8%AF%95%E7%BB%8F%E5%8E%86%E8%AE%B0%E5%BD%95/" title="面试经历记录">面试经历记录</a><time datetime="2024-06-16T06:23:46.849Z" title="发表于 2024-06-16 14:23:46">2024-06-16</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/Bob20020619/Bob20020619.github.io/2024/06/16/%E5%A4%A7%E8%AF%9D%E9%9D%A2%E8%AF%95/" title="大话面试">大话面试</a><time datetime="2024-06-16T06:23:46.843Z" title="发表于 2024-06-16 14:23:46">2024-06-16</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2024 By 周天赐</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div><div class="footer_custom_text">Bob周的博客</div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside-config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/Bob20020619/Bob20020619.github.io/js/utils.js?v=4.13.0"></script><script src="/Bob20020619/Bob20020619.github.io/js/main.js?v=4.13.0"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0.33/dist/fancybox/fancybox.umd.min.js"></script><div class="js-pjax"></div><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>